<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册-<?php echo ($shop_info['store_title']); ?></title>
    <meta http-equiv="keywords" content="<?php echo ($shop_info['store_keyword']); ?>"/>
    <meta name="description" content="<?php echo ($shop_info['store_desc']); ?>"/>
    <link href="/Public/reg/css/reset.css" rel="stylesheet"/>
    <link href="/Public/reg/css/reg3.css" rel="stylesheet"/>
    <link rel='stylesheet' type='text/css' href='/Public/reg/css/common2.css'>
    <link rel="stylesheet" type="text/css" href="/Public/reg/css/common.min.css">
    <script src="/Public/js/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="/Public/js/layer/layer.js"></script><!--弹窗js 参考文档 http://layer.layui.com/-->
    <script src="/Public/js/global.js"></script>
    <style>
        .line .slstyle { height: 40px; }
        .quality { border-top: 1px solid #e5e5e5; padding: 23px 0 22px; overflow: hidden; font-family: 'Tahoma', \5FAE\8F6F\96C5\9ED1 }
        .quality li { height: 44px; line-height: 44px; font-size: 16px; float: left }
        .quality .f2, .quality .f3 { margin-left: 170px; }
        .quality .f4 { float: right }
        .quality .f2 i { background-position: -54px 0; }
        .quality .f3 i { background-position: -108px 0; }
        .quality .f4 i { background-position: -162px 0; }
        .helpful dl dt { font-size: 16px; line-height: 1.2; padding-bottom: 15px; font-family: 'Tahoma', \5FAE\8F6F\96C5\9ED1; margin-left: 2px }
        .helpful dl dd ol li { line-height: 24px; padding-left: 24px }
        .helpful dl dd ol li a:hover { color: #F00; text-decoration: underline }
        .helpful dl { display: inline-block; vertical-align: top; padding-top: 20px; padding-bottom: 20px }
        .shfw, .jszc, .gysc { margin-left: 190px }
        .gzwm { float: right }
        .helpful { border-top: 1px solid #e5e5e5; border-bottom: 0px solid #e5e5e5 }
        .keep-on-record { padding-top: 20px; text-align: center; color: #666; line-height: 1.5; padding-bottom: 20px }
    </style>
</head>
<body>
<div class="regcon">
    <a class="m-fnlogoa fn-fl" href=""><img src="<?php echo ($shop_info['store_logo']); ?>"/></a><span class="m-fntit">欢迎注册</span>
    <div class="ui_tab">
        <ul class="ui_tab_nav regnav">
          <?php if($reg['reg_phone_statu'] == 1): ?><li class="uli <?php if( $_GET['t'] == ''): ?>active<?php endif; ?> ">
                    <a href="<?php echo U('Home/Index/reg/',array('tjr_accname'=>$gettjraccname));?>">手机注册</a>
                </li><?php endif; ?>
            <?php if($reg['reg_email_statu'] == 1): ?><li class="uli <?php if( $_GET['t'] == 'email'): ?>active<?php endif; ?>">
                    <a href="<?php echo U('Home/Index/reg/',array('t'=>'email','tjr_accname'=>$gettjraccname));?>">邮箱注册</a>
                </li><?php endif; ?>
            <?php if($reg['reg_account_statu'] == 1): ?><li class="uli <?php if( $_GET['t'] == 'account'): ?>active<?php endif; ?>">
                    <a href="#">账号注册</a>
                </li><?php endif; ?>
            <li class="no fn-fr loginbtn">我已注册，马上<a href="<?php echo U('Home/Index/index');?>">登录></a></li>
        </ul>

        <?php if($_GET['t'] == ''): ?><form id="reg_form2_phone" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <?php if(isset($_SESSION['user'])): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">报单中心编号：</span></label>
                                    <div class="liner">
                                        <input type="text" value="<?php echo ($_SESSION['user']['account']); ?>" class="inp fmobile J_cellphone"
                                               placeholder="请输入报单中心编号" name="bd_account" id="bd_account" required="" disabled="disabled" />
                                        <p class="fn-fl errorbox v-txt" id="err_zmd">请输入报单中心编号</p>
                                        <input type="hidden" name="zmd_id" value="<?php echo ($_SESSION['user']['user_id']); ?>">
                                    </div>
                                </div>
                            <?php else: endif; ?> 
                            
                                

                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：<?php echo ($user["account"]); ?></span></label>
                                <div class="liner">
                                    <input type="text" value="<?php echo ($uname); ?>"  class="inp fmobile J_cellphone"
                                           placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required/>
                                    <p class="fn-fl errorbox v-txt" id=" err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">帐号：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp J_cellphone" placeholder="请输入由英文字母和数字组成的帐号"
                                           value="<?php if($reg["is_accoutn"] == 1): echo ($account); endif; ?>"
                                           name="account" id="account" required/> <a href="">换一个</a>
                                    <p class="fn-fl errorbox v-txt" id="err_username">帐号不能为空</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">手机号码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp fmobile J_cellphone" placeholder="请输入手机号码"
                                           name="username" id="username" required/>
                                    <p class="fn-fl errorbox v-txt" id="err_username">手机号码输入不正确</p>
                                </div>
                            </div>
                            <?php if($regis_sms_enable == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">手机验证码：</span></label>
                                    <div class="liner">
                                        <input type="text" class="inp imgcode J_imgcode" placeholder="手机验证码" id="code"
                                               name="code" required/>
                                        <button class="fn-fl icode" id="sendSms" onclick="send_sms_reg_code()"
                                                type="button" id="count_down">
                                            发送
                                        </button>
                                        <p class="fn-fl errorbox v-txt" id="err_code">验证码输入不正确</p>
                                    </div>
                                    <div id="show-voice" class="show-voice"></div>
                                </div><?php endif; ?>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="password" name="password" value="<?php echo ($reg['pass']); ?>"
                                           required=""/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码"
                                           autocomplete="off" maxlength="16" id="password2" name="password2" required
                                           value="<?php echo ($reg['pass']); ?>"/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="secpwd" name="secpwd" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码"
                                           autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>

                                <!-- <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">真实姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入真实姓名" autocomplete="off" name="truename"
                                                              required="" id="truename"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_truename">真实姓名不能为空</p>
                                </div>
                                <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入身份证号" autocomplete="off"
                                                              name="id_card" required=""/></div>
                                </div> -->
                            <?php if($reg['reg_bt_8'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入分行支行" autocomplete="off"
                                                              name="bank_address" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_1'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入您的姓名，不可更改，请准确核实" autocomplete="off" name="bank_name"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_9'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入银行账号" autocomplete="off"
                                                              name="bank_account" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_3'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入微信账号" autocomplete="off" name="weixin"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_4'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入Q Q 账号" autocomplete="off" name="qq"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_6'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入支付宝账号" autocomplete="off" name="zfb"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['is_reg_card_statu'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入身份证号，不可更改，请准确核实" autocomplete="off" name="card"
                                                              required=""/></div>
                                </div><?php endif; ?>

                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" id="level" name="level" style="width: 310px;">
                                        <option value="">请选择</option>
                                        <?php if(is_array($lever)): $i = 0; $__LIST__ = array_slice($lever,0,2,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["level_id"]); ?>"><?php echo ($p["level_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_level">请选则报单级别</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province"
                                            onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($province)): $i = 0; $__LIST__ = $province;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>

                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city"
                                            onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($city)): $i = 0; $__LIST__ = $city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>

                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district"
                                            onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($district)): $i = 0; $__LIST__ = $district;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>

                                    <!-- <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon"
                                            id="twon">
                                        <?php if(is_array($twon)): $i = 0; $__LIST__ = $twon;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select> -->
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码"
                                           id="verify_code2" name="verify_code" required/>
                                    <img width="100" height="35" src="/index.php/Home/Index/verify/type/index_reg.html"
                                         id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="/Public/reg/img/chg_image.png"
                                            class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice2" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl"
                                                                                 href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                 target="_blank"
                                                                                 value="<?php echo ($reg['reg_repass']); ?>">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);"
                                       onClick="$('#reg_form2_phone').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt"
                                                                                href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                target="_blank"
                                                                                value="<?php echo ($reg['reg_repass']); ?>">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form><?php endif; ?>

        <?php if($_GET['t'] == 'email'): ?><form id="reg_form2_email" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <?php if($reg["is_reg_zmd_statu"] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">报单中心编号：</span></label>
                                    <div class="liner">
                                        <input type="text" value="<?php echo ($uname); ?>" class="inp fmobile J_cellphone"
                                               placeholder="请输入报单中心编号" name="zmd" id="zmd" required/>
                                        <p class="fn-fl errorbox v-txt" id="err_zmd">请输入报单中心编号</p>
                                    </div>
                                </div><?php endif; ?>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：</span></label>
                                <div class="liner">
                                    <input type="text" value="<?php echo ($uname); ?>"  class="inp fmobile J_cellphone"
                                           placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required/>
                                    <p class="fn-fl errorbox v-txt" id="err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">邮箱：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp J_cellphone" placeholder="请输入邮箱" name="username"
                                           id="username" required/>
                                    <p class="fn-fl errorbox v-txt" id="err_username">邮箱输入不正确</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="password" name="password" value="<?php echo ($reg['pass']); ?>"
                                           required=""/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码"
                                           autocomplete="off" maxlength="16" id="password2" name="password2" required
                                           value="<?php echo ($reg['pass']); ?>"/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="secpwd" name="secpwd" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码"
                                           autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>

                            <?php if($reg['reg_bt_2'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">呢 称：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入呢 称" autocomplete="off" name="nickname"
                                                              required="" id="nickname"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_nickname">呢 称不能为空</p>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_7'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户银行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入开户银行" autocomplete="off"
                                                              name="bank_opening" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_8'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入分行支行" autocomplete="off"
                                                              name="bank_address" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_1'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入开户姓名" autocomplete="off" name="bank_name"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_9'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入银行账号" autocomplete="off"
                                                              name="bank_account" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_3'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入微信账号" autocomplete="off" name="weixin"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_4'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入Q Q 账号" autocomplete="off" name="qq"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_6'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入支付宝账号" autocomplete="off" name="zfb"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['is_reg_card_statu'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入身份证号" autocomplete="off" name="card"
                                                              required=""/></div>
                                </div><?php endif; ?>


                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" id="level" name="level" style="width: 310px;">
                                        <option value="">请选择</option>
                                        <?php if(is_array($lever)): $i = 0; $__LIST__ = array_slice($lever,0,2,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["level_id"]); ?>"><?php echo ($p["level_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_level">请选则报单级别</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province"
                                            onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($province)): $i = 0; $__LIST__ = $province;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city"
                                            onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($city)): $i = 0; $__LIST__ = $city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district"
                                            onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($district)): $i = 0; $__LIST__ = $district;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon"
                                            id="twon">
                                        <?php if(is_array($twon)): $i = 0; $__LIST__ = $twon;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码"
                                           id="verify_code2" name="verify_code" required/>
                                    <img width="100" height="35" src="/index.php/Home/Index/verify/type/index_reg.html"
                                         id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="/Public/reg/img/chg_image.png"
                                            class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl"
                                                                                 href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                 target="_blank">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);"
                                       onClick="$('#reg_form2_email').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt"
                                                                                href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                target="_blank">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form><?php endif; ?>
        <?php if($_GET['t'] == 'account'): ?><form id="reg_form2_email" onsubmit=" return check_submit(this)" method="post">
                <div class="ui_tab_content">
                    <div class="m-fnbox ui_panel" style="display: block;">
                        <div class="fnlogin clearfix">
                            <?php if(isset($_SESSION['user'])): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">报单中心编号：</span></label>
                                    <div class="liner">
                                        <input type="text" value="<?php echo ($_SESSION['user']['account']); ?>" class="inp fmobile J_cellphone"
                                               placeholder="请输入报单中心编号" name="bd_account" id="bd_account" required="" disabled="disabled" />
                                        <p class="fn-fl errorbox v-txt" id="err_zmd">请输入报单中心编号</p>
                                        <input type="hidden" name="zmd_id" value="<?php echo ($_SESSION['user']['user_id']); ?>">
                                    </div>
                                </div>
                            <?php else: ?> 
                            <div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">未登录报单中心编号：</span></label>
                                    <div class="liner">
                                        <input type="text" value="<?php echo ($uname); ?>" class="inp fmobile J_cellphone"
                                               placeholder="请输入报单中心编号" name="zmd" id="zmd" required/>
                                        <p class="fn-fl errorbox v-txt" id="err_zmd">请输入报单中心编号</p>
                                    </div>
                                </div><?php endif; ?> 

                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">推荐人帐号：</span></label>
                                <div class="liner">
                                    <input type="text" value="<?php echo ($uname); ?>"  class="inp fmobile J_cellphone"
                                           placeholder="请输入推荐人帐号" name="tjr_accname" id="tjr_accname" required/>
                                    <p class="fn-fl errorbox v-txt" id="err_tjr_accname">请输入推荐人帐号</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">帐号：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp J_cellphone" placeholder="请输入由英文字母和数字组成的帐号"
                                           value="<?php if($reg["is_accoutn"] == 1): echo ($account); endif; ?>"
                                           name="username" id="username" required/> <a href="">换一个</a>
                                    <p class="fn-fl errorbox v-txt" id="err_username">帐号不能为空</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">设置登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="password" name="password" value="<?php echo ($reg['pass']); ?>"
                                           required=""/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_password">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认登录密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入密码"
                                           autocomplete="off" maxlength="16" id="password2" name="password2" required
                                           value="<?php echo ($reg['pass']); ?>"/>黙认登录密码：<?php echo ($reg['pass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_password2">两次输入密码不一致</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fpass J_password"
                                           placeholder="6-16位大小写英文字母、数字或符号的组合" autocomplete="off" maxlength="16"
                                           id="secpwd" name="secpwd" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl noticebox v-txt2" id="err_secpwd">6-16位字符，建议由字母、数字和符号两种以上组合</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">确认交易密码：</span></label>
                                <div class="liner">
                                    <input type="password" class="inp fsecpass J_password2" placeholder="请再次输入二级密码"
                                           autocomplete="off" maxlength="16" id="secpwd2" name="secpwd2" required
                                           value="<?php echo ($reg['repass']); ?>"/>黙认交易密码：<?php echo ($reg['repass']); ?>
                                    <p class="fn-fl errorbox v-txt" id="err_secpwd2">两次输入交易密码不一致</p>
                                </div>
                            </div>

                            <?php if($reg['reg_bt_2'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">呢 称：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入呢 称" autocomplete="off" name="nickname"
                                                              required="" id="nickname"/></div>
                                    <p class="fn-fl errorbox v-txt" id="err_nickname">呢 称不能为空</p>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_7'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户银行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入开户银行" autocomplete="off"
                                                              name="bank_opening" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_8'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">分行支行：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入分行支行" autocomplete="off"
                                                              name="bank_address" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_1'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">开户姓名：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入开户姓名" autocomplete="off" name="bank_name"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_9'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">银行账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入银行账号" autocomplete="off"
                                                              name="bank_account" required/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_3'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">微信账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入微信账号" autocomplete="off" name="weixin"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_4'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">QQ 账号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入Q Q 账号" autocomplete="off" name="qq"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['reg_bt_6'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">支付宝：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入支付宝账号" autocomplete="off" name="zfb"
                                                              required=""/></div>
                                </div><?php endif; ?>
                            <?php if($reg['is_reg_card_statu'] == 1): ?><div class="line">
                                    <label class="linel" style="width:100px;"><span class="dt">身份证号：</span></label>
                                    <div class="liner"><input type="text" class="inp fsecpass J_password2"
                                                              placeholder="请输入身份证号" autocomplete="off" name="card"
                                                              required=""/></div>
                                </div><?php endif; ?>


                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">会员级别：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" id="level" name="level" style="width: 310px;">
                                        <option value="">请选择</option>
                                        <?php if(is_array($lever)): $i = 0; $__LIST__ = array_slice($lever,0,2,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["level_id"]); ?>"><?php echo ($p["level_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_level">请选则报单级别</p>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">联系地址：</span></label>
                                <div class="liner">
                                    <select class="inp imgcode J_imgcode slstyle" name="province" id="province"
                                            onChange="get_city(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($province)): $i = 0; $__LIST__ = $province;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="city" id="city"
                                            onChange="get_area(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($city)): $i = 0; $__LIST__ = $city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" name="district" id="district"
                                            onChange="get_twon(this)">
                                        <option value="0">请选择</option>
                                        <?php if(is_array($district)): $i = 0; $__LIST__ = $district;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <select class="inp imgcode J_imgcode slstyle" style="display:none;" name="twon"
                                            id="twon">
                                        <?php if(is_array($twon)): $i = 0; $__LIST__ = $twon;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$p): $mod = ($i % 2 );++$i;?><option value="<?php echo ($p["id"]); ?>"><?php echo ($p["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                    <p class="fn-fl errorbox v-txt" id="err_city2">请选择完整的地址</p>
                                    <br>
                                </div>
                            </div>
                            <div class="line">
                                <label class="linel" style="width:100px;"><span class="dt">图像验证码：</span></label>
                                <div class="liner">
                                    <input type="text" class="inp imgcode J_imgcode" placeholder="图像验证码" id="verify_code2" name="verify_code" required/>
                                    <img width="100" height="35" src="/index.php/Home/Index/verify/type/index_reg.html" id="reflsh_code2" class="po-ab to0">
                                    <a><img onclick="verify('reflsh_code2')" src="/Public/reg/img/chg_image.png" class="ma-le-210"></a>
                                    <p class="fn-fl errorbox v-txt" id="err_verify_code">请输入验证码</p>
                                </div>
                                <div id="show-voice" class="show-voice"></div>
                            </div>
                            <div class="line liney clearfix">
                                <label class="linel">&nbsp;</label>
                                <div class="liner">
                                    <div class="clearfix checkcon">
                                        <p class="fn-fl checktxt">
                                            <input type="checkbox" class="iyes fn-fl J_protocal" checked/>
                                            <span class="fn-fl">我已阅读并同意</span><a class="itxt fn-fl"
                                                                                 href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                 target="_blank">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                        </p>
                                        <p class="fn-fl errorbox v-txt" id="protocalBox"></p>
                                    </div>
                                    <a class="regbtn J_btn_agree" href="javascript:void(0);"
                                       onClick="$('#reg_form2_email').submit();">同意协议并注册</a>
                                    <p class="v-txt">
                                        <span class="fnred">请勾选</span>我已阅读并同意<a class="itxt"
                                                                                href="<?php echo U('Home/Topic/detail/topic_id/2');?>"
                                                                                target="_blank">《<?php echo ($reg['shop_info_store_name']); ?>注册协议》</a>
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form><?php endif; ?>
    </div>
</div>
</div>
<div class="footer">
    <div class="helpful layout"></div>
     <div class="keep-on-record">
        <p>
        Copyright © 2017 净易生  版权所有 
        </p>
     </div>
 </div>
 

<script>

    $(document).ready(function () {
        $('input').click(function () {
            $(this).siblings('p').hide();
        });

    });

    // 普通 图形验证码
    function verify(id) {
        $('#' + id).attr('src', '/index.php?m=Home&c=Index&a=verify&type=index_reg&r=' + Math.random());
    }
    function check_submit() {
        var username = $('input[name="username"]').val();
        var password = $('#password').val();
        var secpwd = $('#secpwd').val();
        var secpwd2 = $('#secpwd2').val();
        var level = $('#level').val();
        var zmd = $('#bd_account').val();
        var tjr_accname = $('#tjr_accname').val();
        var password2 = $('input[name="password2"]').val();
        var verify_code = $('input[name="verify_code"]').val();
        var agree = $('input[type="checkbox"]:checked').val();
        var error = '';

        $("p[id^='err_']").each(function () {
            $(this).hide();
        });

        (zmd == '') && $('#err_zmd').show();
        (username == '') && $('#err_username').show();
        ($.trim($('#code').val()) == '') && $('#err_code').show();
        (password == '') && $('#err_password').show();
        (password2 != password) && $('#err_password2').show();
        (secpwd == '') && $('#err_secpwd').show();
        (secpwd2 != secpwd) && $('#err_secpwd2').show();
        (tjr_accname == '') && $('#err_tjr_accname').show();
        (level == '') && $('#err_level').show();
        (verify_code == '') && $('#err_verify_code').show();
        if ($('#username').hasClass('fmobile')) {
            if (!checkMobile(username)) {
                $('#err_username').show();
            }
        } else if ($('#username').hasClass('email')) {
            if (!checkEmail(username)) {
                $('#err_username').show();
            }
        } else {
            if (username == '') {
                $('#err_username').show();
            }
        }
        if ($("p[id^='err_']:visible").length > 0)
            return false;


    }
    // 电子邮件注册  和 手机号码注册 切换
    function reg_tab(id, id2) {
        $('#' + id).addClass('ema-tab');
        $('#' + id2).removeClass('ema-tab');
        $('#' + id + '_div').show();
        $('#' + id2 + '_div').hide();
    }
    // 发送手机短信
    function send_sms_reg_code() {
        var mobile = $('input[name="username"]').val();
        if (!checkMobile(mobile)) {
            layer.alert('请输入正确的手机号码', {icon: 2});//alert('请输入正确的手机号码');
            return;
        }
        var url = "/index.php?m=Home&c=Index&a=send_sms_reg_code&mobile=" + mobile;
        $.get(url, function (data) {
            obj = $.parseJSON(data);
            if (obj.status == 1) {
                $('#sendSms').attr("disabled", "disabled");
                intAs = <?php echo ($sms_time_out); ?>; // 手机短信超时时间
                jsInnerTimeout('sendSms', intAs);
            }
            layer.alert(obj.msg, {icon: 1});// alert(obj.msg);
        })
    }

    $('#count_down').removeAttr("disabled");
    //倒计时函数
    function jsInnerTimeout(id, intAs) {
        var codeObj = $("#" + id);
        //var intAs = parseInt(codeObj.attr("IntervalTime"));

        intAs--;
        if (intAs <= -1) {
            codeObj.removeAttr("disabled");
//            codeObj.attr("IntervalTime",60);
            codeObj.text("发送");
            return true;
        }

        codeObj.text(intAs + '秒');
//        codeObj.attr("IntervalTime",intAs);

        setTimeout("jsInnerTimeout('" + id + "'," + intAs + ")", 1000);
    }
    ;


    function checkMobile(tel) {
        var reg = /(^1[3|4|5|7|8][0-9]{9}$)/;
        if (reg.test(tel)) {
            return true;
        } else {
            return false;
        }
        ;
    }

    function checkEmail(str) {
        var reg = /^([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        if (reg.test(str)) {
            return true;
        } else {
            return false;
        }
    }
</script>
</body>
</html>